﻿<%@ Page Language="C#" MasterPageFile="~/Share/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="ManageMonthSetting.aspx.cs" Inherits="AKMII.DMRA.Web.AdminPages.ManageMonthSetting" Title="Month Configuration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../Content/Js/calendar.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LinkContent" runat="server">
    <a id="breadcrumb_home" href="#">Home</a>&nbsp;&gt;&nbsp; <a id="A1" href="javascript:void(0);">
        Admin Home Page</a>&nbsp;&gt;&nbsp; <a id="A2" href="javascript:void(0);">Month Setting</a>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="DetailsContent" runat="server">

    <script type="text/javascript">
function IsDate(DateString){
    var a=/^\d{4}-\d{1,2}-\d{1,2}$/;
    if(!a.test(DateString))
    {
        return false;
    } 
    else
    {
        return true;
    }
}
function $(id)
{
    return document.getElementById("ctl00_DetailsContent_"+id);
}
function CheckDateFormat()
{
    var startDate=$("txtStartMonth");
    var endDate=$("txtEndMonth");
    var cutOffStart=$("txtCutOffStart");
    var cutOffEnd=$("txtCutOffEnd");
    var uploadDate=$("txtUploadDate");
    if((!IsDate(startDate.value))||(!IsDate(endDate.value))||(!IsDate(cutOffStart.value))||(!IsDate(cutOffEnd.value))||(!IsDate(uploadDate.value)))
    {
        alert("You must type correct date format, such as '2009-03-15'");
        return false;
    }
}
</script>
<div id="admincontentContainnerDiv" class="admincontentContainnerDiv"><br /><br />
   <fieldset>
    <legend>
        Select Month:
    </legend>
    <br />
    <div style="padding-left:120px;">
       <asp:DropDownList AutoPostBack="true" Width="150px" ID="ddlMonth" runat="server" 
            onselectedindexchanged="ddlMonth_SelectedIndexChanged">
       <asp:ListItem Text="January" Value="1"></asp:ListItem>
       <asp:ListItem Text="February" Value="2"></asp:ListItem>
       <asp:ListItem Text="March" Value="3"></asp:ListItem>
       <asp:ListItem Text="April" Value="4"></asp:ListItem>
       <asp:ListItem Text="May" Value="5"></asp:ListItem>
       <asp:ListItem Text="June" Value="6"></asp:ListItem>
       <asp:ListItem Text="July" Value="7"></asp:ListItem>
       <asp:ListItem Text="August" Value="8"></asp:ListItem>
       <asp:ListItem Text="September" Value="9"></asp:ListItem>
       <asp:ListItem Text="October" Value="10"></asp:ListItem>
       <asp:ListItem Text="November" Value="11"></asp:ListItem>
       <asp:ListItem Text="December" Value="12"></asp:ListItem>
       </asp:DropDownList>
       </div>
              <br /><br />
   </fieldset><br /><br />
    <fieldset>
    <legend>
        Configure Action Date For This Month:
    </legend>
    <br />
    <div style="padding-left:80px;"><br />
    Start Date of Month:<asp:TextBox onclick="new Calendar(2009, 2020, 1).show(this);"  ID="txtStartMonth" CssClass="input" runat="server"></asp:TextBox><br /><br />
    End Date of Month:&nbsp;<asp:TextBox onclick="new Calendar(2009, 2020, 1).show(this);" ID="txtEndMonth" CssClass="input" runat="server"></asp:TextBox><br /><br />
    Cut Off Start Date:&nbsp;&nbsp;<asp:TextBox onclick="new Calendar(2009, 2020, 1).show(this);" CssClass="input" ID="txtCutOffStart" runat="server"></asp:TextBox><br /><br />
    Cut Off End Date:&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox onclick="new Calendar(2009, 2020, 1).show(this);" CssClass="input" ID="txtCutOffEnd" runat="server"></asp:TextBox><br /><br />
    Upload Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox onclick="new Calendar(2009, 2020, 1).show(this);" CssClass="input" ID="txtUploadDate" runat="server"></asp:TextBox><br /><br />
       <br /> <asp:Button OnClientClick="return CheckDateFormat();" ID="btnCommit" CssClass="filterbutton" runat="server" Text="Commit" 
            onclick="btnCommit_Click" />  
       </div>
  
              <br />
   </fieldset>
</div>
</asp:Content>
